﻿package cn.antscript.airCMS.data 
{
	import cn.antscript.airCMS.data.singleData.VideoData;
	/**
	 * ...
	 * @author 
	 */
	public class VideosData implements IGroupBtn
	{
		public var allowDel:Boolean;
		public var container:Vector.<VideoData>;
		
		public var label:String;
		
		public function VideosData(xml:XML) 
		{
			//<videos label="v2" allowDel="">
					//<video label="v21" txt="" url="" timestamp="" />
					//<video label="v22" txt="" url="" timestamp="" />
					//<video label="v23" txt="" url="" timestamp="" />
				//</videos>
			
			allowDel = String(xml.@allowDel) == "1";
			label = String(xml.@label);
			var data:VideoData;
			container = new Vector.<VideoData>();
			for (var i:int = 0; i < xml.video.length(); i++) 
			{
				data = new VideoData(	String(xml.video[i].@id),
										String(xml.video[i].@label),
										String(xml.video[i].@content),
										String(xml.video[i].@url),
										String(xml.video[i].@timestamp));
										
				container.push(data);
			}
		}
		
	}

}